<template>
<div>
  <div class="top-com">
    <top-title></top-title>
    <quo-title :middle="midtitle" :name="right"></quo-title>
    <quo-info-top></quo-info-top>
    <relative-person :postName="this.$route.query.posname" :sendName="this.$route.query.senname"></relative-person>
  </div>
  <div class="contain-com">
    <quo-inf-con :quo="this.$route.query.quo" :metplaces="this.$route.query.metplaces"></quo-inf-con>
  </div>
  <div>
    <inf-con-bottom v-if="this.$route.query.quo.state == '草稿'" :name1="name1" :name2="name2" :show1="isShow1" :show2="isShow2"
                    v-on:btn2="ifdel(showSmaWin,pagenom)"></inf-con-bottom>
  </div>
  <div>
    <small-window-del v-if="showSmaWin" v-on:retrect="ifdel(showSmaWin)"
    :s1="s1" :s2="s2" :mes1="mes1" :mes2="mes2"></small-window-del>
  </div>
</div>
</template>

<script>
import topTitle from "../../components/topTitle";
import quoTitle from "../../components/quoTitle";
import quoInfoTop from "../../components/quoInfoTop";
import quoInfCon from "../../components/quoInfCon";
import infConBottom from "../../components/infConBottom";
import smallWindowDel from "../../components/smallWindowDel";
import relativePerson from "../../components/relativePerson";
export default {
  name: "postQuoInf",
  components:{
    topTitle,
    quoTitle,
    quoInfoTop,
    quoInfCon,
    infConBottom,
    smallWindowDel,
    relativePerson
  },
  data(){
    return{
      midtitle: "工单详情",
      right: this.$route.query.person.personName,
      isShow1:true,
      isShow2:true,
      name1: "编辑",
      name2: "删除",
      showSmaWin:false,
      pagenom:4,
      pageChar:{
        s1: '',
        s2: '',
        mes1: '',
        mes2: '',
      }
    }
  },
  methods:{
    ifdel:function (showSmaWin,pagenom){
      this.showSmaWin = !showSmaWin;
      switch (pagenom) {
        case 0:
          this.s1 =true;
          this.s2=false;
          this.mes1='是否确认删除此工单';
          break;
        case 1:
          this.s1 =true;
          this.s2=false;
          this.mes1='是否确认撤回此工单';
          break;
        case 3:
            this.s1 =false;
            this.s2=true;
           this.mes2='请填写暂停理由';
          break;
        case 4:
            this.s1=false;
            this.s2=true;
            this.mes2='请填写恢复理由';
          break;
          console.log(this.s1,this.s2,this.mes1,this.mes2);
      }
    },
  }
}
</script>

<style scoped>

</style>
